/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package tetrisdamage;

import java.util.logging.Level;
import java.util.logging.Logger;
import static org.lwjgl.glfw.GLFW.*;

/**
 *
 * @author Zheltoukhov
 */
public class World {

    private Engine eng;

    public World() {
        try {
            eng = new Engine();
        } catch (Exception ex) {
            Logger.getLogger(World.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void play() {
        while (!eng.isClose()) {
            eng.update();
            if (eng.isKeyPressed(GLFW_KEY_ESCAPE)) {
                eng.close();
                break;
            }
        }
    }

    public static void main(String[] args) {
        new World().play();
    }

}
